let res = {
    data: "var globalConfig = {app_id:'we813829731483914240',app_name:'',secret:'d2U4MTM4Mjk3MzE0ODM5MTQyNDA6YnAzRmJ6ZGlRSEthNWpZVlVWZTU0WQ',context:'mall',support:'',};"
}
let str = res.data.split("=")[1].replace(";","").replace(/(?:\s*['"]*)?([a-zA-Z0-9_]+)(?:['"]*\s*)?:/g, "'$1':").replace(/'/g,"\"").replace(",}","}")
let JSONString = res.data.split("=")[1]
JSONString = JSONString.replace(/,};/,"}")
JSONString = JSONString.replace(/'/g,"\"")
JSONString = JSONString.replace(/(?:\s*['"]*)?([a-zA-Z0-9_]+)(?:['"]*\s*)?:/g, "\"$1\":")
console.log( JSON.parse(JSONString))
